CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT("borad_game")

INCLUDE_DIRECTORIES( 
  "${CMAKE_CURRENT_SOURCE_DIR}/include"
  "${CMAKE_CURRENT_SOURCE_DIR}/test"
)

IF(MSVC)
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS )
  ADD_DEFINITIONS(-DMSVC_VMG_ENABLED)
  
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /vmg")
ENDIF(MSVC)

IF(UNIX)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
ENDIF(UNIX)

FILE(GLOB_RECURSE all_files 
include/*.h
include/*.hpp
include/*.hxx
include/*.tcc
src/*.cpp
src/*.cc
src/*.cxx
src/*.c
test/*.cpp
test/*.cc
test/*.cxx
test/*.c)

link_directories("${CMAKE_CURRENT_SOURCE_DIR}/3th/lib")

add_executable(board_game ${all_files})

target_link_libraries(board_game gtest pthread stdc++)

